#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main22()
{
	int a = 1;
	int n = 0;
	for (a = 1; a <= 100; a++)
	{
		if (a / 10 == 9 )
			n++;
		if( a % 10 == 9)
			n++;
	}
	
	printf("%d", n);
	return 0;
}